package com.chanyachting.emall.service;

import com.chanyachting.emall.domain.Productimage;

public class ProductimageBO {
	
	
	private Productimage pimg;
	
	public ProductimageBO(){
		
		
	}
	
	public ProductimageBO(Productimage pimg){
		
		this.pimg=pimg;
	}
	
	
	public static boolean createProductimage(int productId,String imgUrl,String imgDesc){
		
		
		if(imgUrl==null || imgUrl.trim().equals("")) return false;
		
		Productimage pimg=new Productimage();
		
		pimg.setImgUrl(imgUrl);
		pimg.setProductId(productId);
		pimg.setSummary(imgDesc);
		pimg.setIsdefaul("00"); //默认不是产品默认图片
		
		return pimg.save();
	}

}
